﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Mobile.master" AutoEventWireup="true"
    CodeFile="call-me.aspx.cs" Inherits="car_insurance_call_me" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="fix-header">
        <div class="header">
            <a href="../home.aspx">
                <div class="logo-text">
                    GluayGluay
                </div>
            </a>
        </div>
        <div id="new-code">
            <div class="new-code">
                <asp:ImageButton runat="server" ID="ibtnBack" AlternateText="" ImageUrl="" width="81px" height="29px" OnClick="ibtnBack_Click" />
            </div>
        </div>
    </div>
    <div class="container">
        <div id="divCallMe" runat="server">
            <div class="big-title-3">
                <asp:Label ID="lblApplicationTitle" runat="server" Text=""></asp:Label>
            </div>
            <div style="width: 100px; float: left; padding-top: 10px; padding-left: 10px;">
                <asp:Label ID="lblCallMeTimeTitle" runat="server" Text=""></asp:Label>
            </div>
            <div style="width: 100px; float: left;">
                <asp:DropDownList ID="ddlCallMeTime" runat="server" CssClass="your-detail-fields-2"
                    Width="160">
                    <asp:ListItem Value="-1" Text="<%$Resources:CarMenu,Select %>" />
                    <asp:ListItem Value="1" Text="<%$Resources:CarMenu,CallMeMorning %>" />
                    <asp:ListItem Value="2" Text="<%$Resources:CarMenu,CallMeAfternoon %>" />
                    <asp:ListItem Value="3" Text="<%$Resources:CarMenu,CallMeEvening %>" />
                    <asp:ListItem Value="4" Text="<%$Resources:CarMenu,CallMeAnytime %>" />
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfvCallMeTime" ControlToValidate="ddlCallMeTime"
                    runat="server" ValidationGroup="callme" CssClass="validationError" ErrorMessage=""
                    InitialValue="-1"></asp:RequiredFieldValidator>
            </div>
            <asp:RequiredFieldValidator ID="rfvUserName" runat="server" CssClass="validationError"
                ValidationGroup="callme" ErrorMessage="" Text="" ControlToValidate="txtUserName"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="revUserName" runat="server" ValidationGroup="callme"
                ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" CssClass="validationError"
                ControlToValidate="txtUserName" ErrorMessage=""></asp:RegularExpressionValidator>
            <html5:TextInput ID="txtUserName" MaxLength="50" runat="server" CssClass="your-detail-fields-1"
                Text="<%$Resources:CarMenu,YourName%>"></html5:TextInput>
            <asp:RegularExpressionValidator ID="rfvUserEmail" Text="" CssClass="validationError"
                runat="server" ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtUserEmail"
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="revUserEmail" runat="server" Text="" CssClass="validationError"
                ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtUserEmail" Display="Dynamic"></asp:RequiredFieldValidator>
            <html5:EmailInput ID="txtUserEmail" runat="server" MaxLength="80" CssClass="your-detail-fields-1"
                Text="<%$Resources:CarInsurance,YourEmail%>"></html5:EmailInput>
            <asp:RequiredFieldValidator ID="rfvUserMobile" runat="server" CssClass="validationError"
                ValidationGroup="callme" ErrorMessage="" Text="" ControlToValidate="txtUserMobile"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="revUserMobile" runat="server" ValidationGroup="callme"
                ValidationExpression="0[8-9]\d{8}" ControlToValidate="txtUserMobile" CssClass="validationError"
                ErrorMessage=""></asp:RegularExpressionValidator>
            <html5:PhoneInput ID="txtUserMobile" runat="server" CssClass="your-detail-fields-1"
                MaxLength="10" Text="<%$Resources:CarMenu,MobileSample%>"></html5:PhoneInput>
            <asp:UpdatePanel ID="upnlForm" runat="server">
                <ContentTemplate>
                    <div class="order-now-btn-link">
                        <asp:Button runat="server" ID="btnSubmit" Text="<%$Resources:CarMenu,BuyNow%>" CssClass="order-now-btn"
                            Height="45px" OnClick="btnSubmit_Click" ValidationGroup="callme" OnClientClick="LoadValidationErrorCss()" />
                    </div>
                    <div>
                        <asp:Label ID="lblErrorMessage" runat="server" ForeColor="Red"></asp:Label>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdateProgress AssociatedUpdatePanelID="upnlForm" ID="updateProgress3" DynamicLayout="false"
                DisplayAfter="0" runat="server">
                <ProgressTemplate>
                    <div style="position: absolute;">
                        <img alt="Loading" src="../images/loader/loader_main.gif" width="66" height="66" style="padding: 0px 150px 50px 110px;" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </div>
        <div id="divCallMeMessage" runat="server" visible="false">
            <div class="thanks-title">
                <asp:Label ID="lblThanksTitle" runat="server" Text=""></asp:Label></div>
            <div class="thanks-text">
                <asp:Label ID="lblMessage1" runat="server"></asp:Label>
                <br>
                <br>
                <asp:Label ID="lblMessage2" runat="server"></asp:Label></div>
            <div id="call-btn">
                <a href="tel:022688222">
                    <img src="../images/call-btn.png" width="227" height="47" alt=""></a></div>
            <div id="partner-box">
                <img src="../images/animated-logo.gif" width="216" height="75" alt="" /></div>
            <div class="social-icons">
            <div class="fb-icon">
                <a href="https://www.facebook.com/GGmotor" target="_blank">
                    <img src="../images/icons/fb-icon.png" width="40" height="40" alt="" /></a></div>
            <div class="gplus-icon">
                <a href="https://plus.google.com/+Gluaygluay" target="_blank">
                    <img src="../images/icons/gplus-icon.png" width="40" height="40" alt="" /></a></div>
            <div class="instagram-icon">
                <a href="http://instagram.com/ggmotor" target="_blank">
                    <img src="../images/icons/instagram-variation.png" width="40" height="40" alt="" /></a></div>
            <div class="youtube-icon">
                <a href="http://www.youtube.com/channel/UCZ4gMtlXymBHxvcXO2cR1vA" target="_blank">
                    <img src="../images/icons/youtube-variation.png" width="40" height="40" alt="" /></a></div>
                     <div class="linkedin-icon">
                <a href="http://www.linkedin.com/company/-com-gluaygluay-com-" target="_blank">
                    <img src="../images/icons/linkedin-variation.png" width="40" height="40" alt="" /></a></div>
        </div>
        </div>
        <div style="display: none;">
            <asp:HiddenField ID="hdnQuoteId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnCarId" runat="server" Value="0" />
            <asp:HiddenField ID="hdnPolicyId" runat="server" Value="0" />
        </div>
        <input id="inputLang" value="" style="display: none;" />
    </div>

    <script type="text/javascript">
        function RemoveSpace(c) {
            c.value = c.value.split(' ').join('')
        }

        function DefaultName(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your name ...";
                }
                else {
                    TextBoxControl.value = "ชื่อของคุณ  ...";
                }
            }
        }

        function DefaultEmail(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Your E-mail address ...";
                }
                else {
                    TextBoxControl.value = "อีเมล์";
                }
            }
        }

        function DefaultPhone(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
                if (document.getElementById('inputLang').value == 'EN') {
                    TextBoxControl.value = "Example: 0893998209";
                }
                else {
                    TextBoxControl.value = "ตัวอย่าง 0893998209";
                }
            }
        }

        function ClearText(TextBoxControl, TextBoxEvent) {
            if (TextBoxControl.value == "Your name ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "ชื่อของคุณ  ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Your E-mail address ...") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }

            if (TextBoxControl.value == "อีเมล์") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
            if (TextBoxControl.value == "Example: 0893998209") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'EN'
            }
            if (TextBoxControl.value == "ตัวอย่าง 0893998209") {
                TextBoxControl.value = "";
                document.getElementById('inputLang').value = 'TH'
            }
        }
        
    </script>

</asp:Content>
